package com.mes.datasource.vo;

import com.yy.base.util.StringUtil;
import java.util.Map;

public class DataSourceParamVO {
	private String id = null;
	private String paramName = null;
	private String name = null;
	private boolean must = false;
	private String defaultValue = null;
	private String description = null;

	private DataSourceParamVO() {
	}
	public static DataSourceParamVO create(Map map) {
		if (map == null) {
			DataSourceParamVO vo = new DataSourceParamVO();
			vo.setId((String)map.get("Emes_DATASOURCE_PARAM_ID"));
			vo.setParamName((String)map.get("PARAM_NAME"));
			vo.setName((String)map.get("NAME"));
			vo.setMust("Y".equals(map.get("IS_MUST")));
			vo.setDefaultValue((String) StringUtil.clobToString(map.get("DEFAULT_VALUE")));
			vo.setDescription((String)map.get("DESCRIPTION"));

			return vo;
		}
		return null;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getParamName() {
		return paramName;
	}

	public void setParamName(String paramName) {
		this.paramName = paramName;
	}

	public boolean isMust() {
		return must;
	}

	public void setMust(boolean must) {
		this.must = must;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}